<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>审核帖子</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-color: #f5f7fa;
            padding: 20px;
            color: #333;
        }

        .container {
            max-width: 1000px;
            margin: 0 auto;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            overflow: hidden;
            padding: 20px;
        }

        .post-info {
            margin-bottom: 30px;
            padding: 20px;
            background: linear-gradient(135deg, #f6f9fc, #eef2f5);
            border-radius: 6px;
            border-left: 4px solid #1a73e8;
        }

        .post-info p {
            margin-bottom: 12px;
            font-size: 14px;
            line-height: 1.6;
        }

        .post-info strong {
            color: #3c4043;
            min-width: 80px;
            display: inline-block;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 10px;
            object-fit: cover;
            vertical-align: middle;
        }

        .user-name {
            font-weight: bold;
            color: #3c4043;
            vertical-align: middle;
        }

        .images img {
            max-width: 100px;
            max-height: 100px;
            margin-right: 10px;
            margin-top: 10px;
            border-radius: 4px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .form-horizontal {
            margin-top: 20px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .control-label {
            font-weight: 500;
            color: #3c4043;
            padding-top: 7px;
            text-align: right;
        }

        .form-control {
            border-radius: 4px;
            border: 1px solid #dadce0;
            padding: 8px 12px;
            box-shadow: none;
            transition: border-color 0.2s;
        }

        .form-control:focus {
            border-color: #1a73e8;
            box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
        }

        textarea.form-control {
            min-height: 100px;
        }

        .btn-primary {
            background-color: #1a73e8;
            border-color: #1a73e8;
            padding: 8px 20px;
            border-radius: 4px;
            font-weight: 500;
            transition: background-color 0.2s;
        }

        .btn-primary:hover {
            background-color: #1765cc;
            border-color: #1765cc;
        }

        #reason-group {
            display: none;
            animation: fadeIn 0.3s;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .selectpicker {
            width: 100%;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="post-info">
            <p><strong>用户：</strong><img src="{$row.user.avatar}" class="user-avatar" alt="用户头像"><span
                    class="user-name">{$row.user.nickname}</span></p>
            <p><strong>联系电话：</strong>{$row.mobile}</p>
            <p><strong>帖子标题：</strong>{$row.name}</p>
            <p><strong>帖子内容：</strong>{$row.content}</p>
            <div class="images">
                <strong>图片：</strong>
                {volist name=":explode(',', $row.images)" id="image"}
                <img src="{$image}" alt="帖子图片">
                {/volist}
            </div>
        </div>

        <form id="audit-form" class="form-horizontal" method="post" action="post/shenpost/handle?ids={$row.id}">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">审核状态:</label>
                <div class="col-xs-12 col-sm-8">
                    <select name="row[stutes]" class="form-control selectpicker" id="audit-status">
                        <option value="0" {if $row.stutes==0}selected{/if}>待审核</option>
                        <option value="1" {if $row.stutes==1}selected{/if}>审核通过</option>
                        <option value="2" {if $row.stutes==2}selected{/if}>审核失败</option>
                    </select>
                </div>
            </div>

            <div class="form-group" id="reason-group">
                <label class="control-label col-xs-12 col-sm-2">失败原因:</label>
                <div class="col-xs-12 col-sm-8">
                    <textarea name="row[reason]" class="form-control" rows="3"
                        placeholder="请输入审核失败原因">{$row.reason}</textarea>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-8 col-sm-offset-2">
                    <button type="submit" class="btn btn-primary">提交</button>
                </div>
            </div>
        </form>
    </div>
</body>

</html>